
function success(data){
    console.log(data)
}

function access(user, resource, url, check){
    operation = 'delete';
    if (check.checked) 
        operation = 'insert';
    $.ajax({
        type: 'POST',
        url: url,
        data: 'iduser=' + user + '&idresource=' + resource + '&operation=' + operation,
        success: success
    });
}

function visible(user, resource, url, check){
    operation = 'delete';
    if (check.checked) 
        operation = 'insert';
    $.ajax({
        type: 'POST',
        url: url,
        data: 'iduser=' + user + '&idresource=' + resource + '&operation=' + operation,
        success: success
    });
}







